import Env from '../model/env'

// 在调试环境打印日志

const Logger = fname => {
	let instance = {
		log: (...args) => {
			if (fname) {
				args.unshift('[cctvact][' + fname + ']')
			}
			if (Env.enableFelog) {
				window.console.log(...args)
			}
		}
	}
	return instance
}

export default Logger
